package com.ruoyi.member.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.member.domain.vo.SalesOrder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.member.mapper.BmInorderlistMapper;
import com.ruoyi.member.domain.BmInorderlist;
import com.ruoyi.member.service.IBmInorderlistService;

/**
 * #销售单管理Service业务层处理
 *
 * @author ruoyi
 * @date 2023-08-03
 */
@Service
public class BmInorderlistServiceImpl implements IBmInorderlistService
{
    @Autowired
    private BmInorderlistMapper bmInorderlistMapper;
    /**
     * 查询销售单
     */
    @Override
    public List<SalesOrder> getSalesOrder(SalesOrder SalesOrder) {
        return bmInorderlistMapper.getSalesOrder(SalesOrder);
    }

    /**
     * 查询#销售单管理
     *
     * @param orderCode #销售单管理主键
     * @return #销售单管理
     */
    @Override
    public SalesOrder selectBmInorderlistByOrderCode(String orderCode)
    {
        return bmInorderlistMapper.selectBmInorderlistByOrderCode(orderCode);
    }

    /**
     * 查询#销售单管理列表
     *
     * @param bmInorderlist #销售单管理
     * @return #销售单管理
     */
    @Override
    public List<BmInorderlist> selectBmInorderlistList(BmInorderlist bmInorderlist)
    {
        return bmInorderlistMapper.selectBmInorderlistList(bmInorderlist);
    }

    /**
     * 新增#销售单管理
     *
     * @param bmInorderlist #销售单管理
     * @return 结果
     */
    @Override
    public int insertBmInorderlist(BmInorderlist bmInorderlist)
    {
        bmInorderlist.setCreateTime(DateUtils.getNowDate());
        return bmInorderlistMapper.insertBmInorderlist(bmInorderlist);
    }

    /**
     * 修改#销售单管理
     *
     * @param bmInorderlist #销售单管理
     * @return 结果
     */
    @Override
    public int updateBmInorderlist(BmInorderlist bmInorderlist)
    {
        return bmInorderlistMapper.updateBmInorderlist(bmInorderlist);
    }

    /**
     * 批量删除#销售单管理
     *
     * @param orderCodes 需要删除的#销售单管理主键
     * @return 结果
     */
    @Override
    public int deleteBmInorderlistByOrderCodes(String[] orderCodes)
    {
        return bmInorderlistMapper.deleteBmInorderlistByOrderCodes(orderCodes);
    }

    /**
     * 删除#销售单管理信息
     *
     * @param orderCode #销售单管理主键
     * @return 结果
     */
    @Override
    public int deleteBmInorderlistByOrderCode(String orderCode)
    {
        return bmInorderlistMapper.deleteBmInorderlistByOrderCode(orderCode);
    }

    @Override
    public int updateOrderStepToTwo(String orderCode) {
        return bmInorderlistMapper.updateOrderStepToTwo(orderCode);
    }

    @Override
    public int updateOrderStepToThree(String orderCode) {
        return bmInorderlistMapper.updateOrderStepToThree(orderCode);
    }

    @Override
    public int updateOrderStepToFour(String orderCode) {
        return bmInorderlistMapper.updateOrderStepToFour(orderCode);
    }

    @Override
    public int updateOrderStepToFive(String orderCode) {
        return bmInorderlistMapper.updateOrderStepToFive(orderCode);
    }

    @Override
    public int updateOrderStepToSix(String orderCode) {
        return bmInorderlistMapper.updateOrderStepToSix(orderCode);
    }

    @Override
    public int updateOrderStepToSeven(String orderCode) {
        updateOrderStatus(orderCode);
        return bmInorderlistMapper.updateOrderStepToSeven(orderCode);
    }

    @Override
    public int updateOrderStatus(String orderCode) {
        return bmInorderlistMapper.updateOrderStatus(orderCode);
    }

    /**
     * @Description: 根据订单编号查询订单所有信息
     * @Param:
     * @return:
     * @Author: huang
     * @Date: 2023/8/11
     */
    @Override
    public BmInorderlist selectAll(String orderCode) {
        return bmInorderlistMapper.selectAll(orderCode);
    }

    @Override
    public List<Map<String, Object>> selectInorderList(Map<String, Object> map) {
        return bmInorderlistMapper.selectInorderList(map);
    }

    @Override
    public List<Map<String, Object>> selectInorderGoodsList(Map<String, Object> map) {
        return bmInorderlistMapper.selectInorderGoodsList(map);
    }


}
